package com.lewis.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.lewis.dao.CourseDAO;
import com.lewis.jpa.entity.Course;
import com.lewis.service.CourseService;
@Service
public class CourseServiceImpl implements CourseService {

	@Autowired
	private CourseDAO courseDAO;
	
	@Override
	@Transactional(value = "transactionManager")
	public void createCourse(Course course) {
		courseDAO.createCourse(course);
		
	}

	@Override
	@Transactional(value = "transactionManager")
	public void createCourses(List<Course> courses) {
		courseDAO.createCourses(courses);
		
	}

}
